define(['common/js/service/boss-common-service-0.1'],
	function() {
		serviceModule.factory("ShowTreeList", function ($window, $http, $q) {
			return {
				list: function () {
					var deferred = $q.defer();
					$http({method: globalVar.methodGet, url: globalVar.treeRestShowPath, params:globalVar.sysparams, timeout: 60000}).
						success(function (data, status) {
							deferred.resolve(data);
						}).
						error(function (data, status) {
							deferred.reject(data);
						});
					return deferred.promise;
				}
			};
		});

		serviceModule.factory("MenuService", function ($window, $http, $q) {
			return {
				list: function () {
					var deferred = $q.defer();
					$http({method: globalVar.methodGet, url: rootPath + "/transition/css/menus.json", timeout: 60000}).
						success(function (data, status) {
							deferred.resolve(data);
						}).
						error(function (data, status) {
							deferred.reject(data);
						});
					return deferred.promise;
				}
			};
		});
	});